Skip to main content

Playable Class

Description:

  A class for creating instances of the 'Playable' record.

__call

Type: Metamethod.

Description:

  Creates a new instance of 'Playable' from the specified animation file.

Signature:

metamethod __call: function(self: PlayableClass, filename: string): Playable | nil

Parameters:

ParameterTypeDescription
filenamestringthe filename of the animation file to load.Supports DragonBone, Spine2D and Dora Model files.Should be one of the formats below: "model:" + modelFile "spine:" + spineStr "bone:" + dragonBoneStr

Returns:

Return TypeDescription
Playablea new instance of 'Playable'. If the file could not be loaded, then nil is returned.